﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HMS_Hospital_Team2._6.DA
{
    class ThongTinBanThuDA
    {
        // Hàm lưu thông tin bàn thu
        public static void LuuThongTinBanThu_DA(string smaban, string smanv, string smattbt, string svitri, DateTime dathoigiansd)
        {

            using (HMSHospitalEntities context = new HMSHospitalEntities())
            {
                ThongTinBanThu ttbanthu = new ThongTinBanThu();
                ttbanthu.MaBan = smaban;
                ttbanthu.MaNhanVien = smanv;
                ttbanthu.MaTTBT = smattbt;
                ttbanthu.ViTri = svitri;
                ttbanthu.ThoiGianSD = dathoigiansd;

                context.AddToThongTinBanThus(ttbanthu);
                context.SaveChanges();
            }
        }
    }
}
